.TH REBOOT 2
.SH NAME
reboot \- close down the system or reboot
.SH SYNTAX
.ft B
.nf

#include <sys/mount.h>
#include <arch/system.h>

int reboot(int \fImagic1\fP, int \fImagic2\fP, int \fIhow\fP)
.fi
.ft P
.SH DESCRIPTION
.B Reboot()
is used to close down the system.  It allows several ways of shutting
down depending on
.IR how :
.PP
.TP 5
.BI "reboot(0, 0, RB_SHUTDOWN)"
Halt the system.
.TP
.BI "reboot(0, 0, RB_POWEROFF)"
Power off the system if possible, reset otherwise.
.TP
.BI "reboot(0, 0, RBT_REBOOT)"
Reboot the system with a hardware reset.
.PP
.B Reboot()
may only be executed by the super-user.
.SH DIAGNOSTICS
If the call succeeds, it never returns.  If something went wrong,
the return value is -1 and an error is indicated by
.BR errno .
.SH SEE ALSO
.BR shutdown (8),
.BR reboot (8),
.BR poweroff (8),
.BR sync (2).
